﻿@inherits BaseDialogPage<SaleOrderModel>

<ModalTemplate>
    <ModalBodyTemplate>

        <ValidateForm Model="@Model" OnValidSubmit="SaveAsync">
            <FluentValidationValidator />

            <div class="body-header">
                <Button Text="Tets" IsAsync="true" Icon="fa fa-save" ButtonType="ButtonType.Button"></Button>

                <Button Text="保存" IsAsync="true" Icon="fa fa-save" ButtonType="ButtonType.Submit"></Button>
            </div>
            <div class="form-inline">
                <div class="row ">
                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.Number" ShowLabel="true" />
                    </div>
                    <div class="form-group col-6">
                        <BootstrapInput @bind-Value="@Model.CustomerId" ShowLabel="true" />
                        <ValidationMessage For="()=>Model.CustomerId" />
                    </div>
                    <div class="form-group col-6">
                        <DateTimePicker @bind-Value="@Model.OrderDate" ShowLabel="true" />
                    </div>

                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.TotalAmount" ShowLabel="true" />
                    </div>
                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.CreateByName" ShowLabel="true" />
                    </div>
                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.CreateDate" ShowLabel="true" />
                    </div>
                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.UpdateByName" ShowLabel="true" />
                    </div>
                    <div class="form-group col-6">
                        <Display @bind-Value="@Model.UpdateDate" ShowLabel="true" />
                    </div>
                </div>
            </div>
        </ValidateForm>
        <SaleOrderItems SaleOrderId="Model.Id"></SaleOrderItems>
    </ModalBodyTemplate>
</ModalTemplate>
